package com.example.demo.service;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.example.demo.entity.Child;
import com.example.demo.repository.ChildRepostory;

@Service
public class ChildService {

	@Resource
	private ChildRepostory childRepostory;
	
	@Transactional
	public Child addChild(Child child) {
		
		return childRepostory.save(child);
	}
}
